package Java8实战._1_LocalDate_LocalTime_Instant_Duration_Period._1_LocalData_LocalTime;

import java.time.DayOfWeek;
import java.time.LocalDate;
import java.time.Month;

public class _1_LocalDate {

    public static void main(String[] args) {

        //通过静态工厂方法of创建一个LocalDate实例
        LocalDate localDate = LocalDate.of(2014,3,18);
        int year = localDate.getYear();
        System.out.println("year : " + year);
        Month month = localDate.getMonth();

        int day = localDate.getDayOfMonth();
        System.out.println("day : " + day);

        DayOfWeek dayOfWeek = localDate.getDayOfWeek();
        System.out.println("dayOfWeek : " + dayOfWeek);

        int len = localDate.lengthOfMonth();
        System.out.println("len : " + len);

        boolean leap = localDate.isLeapYear();
        System.out.println("leap : " + leap);

        LocalDate today = LocalDate.now();
//        System.out.println();
    }
}


















